from flask import send_from_directory, current_app
from flask_restful import Resource
import os


class ReactAppView(Resource):
    def get(self):
        dist_dir = os.path.abspath(os.path.join(current_app.root_path, '..', '..', '..', 'web', 'dist'))
        return send_from_directory(dist_dir, 'index.html')
